import numpy


class Cube:
    def __init__(self, points):
        self.points = tuple(numpy.array(point) for point in points)

    def __mul__(self, other):
        if isinstance(other, numpy.ndarray):
            points = (point.dot(other) for point in self.points)
            return Cube(points)

    def __str__(self):
        # s=""
        s = f"size:{len(self.points)}\n"
        for point in self.points:
            s += f"{point}\n"
        return s


def main():
    T = numpy.array((
        (1, 0, 0, 0),
        (0, 1, 0, 0),
        (0, 0, 1, 0),
        (0, -2, 0, 1)
    ))
    c = Cube(((0, 0, 0, 1), (1, 0, 0, 1), (1, 1, 0, 1), (0, 1, 0, 1),
              (0, 0, 2, 1), (1, 0, 2, 1), (1, 1, 2, 1), (0, 1, 2, 1)))
    print(str(c))
    print('-----')    
    print(c*T)
    # print(c*T)



if __name__ == "__main__":
    main()
